Skip to main content

Get Incident Report Metrics

Method: GET
/api/v1/incident-reports/metrics


Description

This endpoint retrieves metrics for incident reports. You can filter and group the metrics based on various criteria, such as incident status, date range, user actions, and more.


🔑 Authentication

This endpoint requires authentication via headers.

ParamValueType
tenantId{{tenantId}}string
userId{{userId}}string
countryCode{{countryCode}}string (optional)

Query Parameters

NameTypeDescription
incidentSearchstringSearch for incidents by keyword or term.
groupBystringGroup metrics by fields (comma-separated list). Available values: CREATED_BY, DELETED_BY, UPDATED_BY, PRODUCT_ID, PRODUCT_USER, TRADE_PRODUCT_ID, TRADE_STATE, TRADE_CITY, TRADE_BUYER, TRADE_SELLER, SELLER_TYPE.
metricDateRangestringFilter metrics by date range (e.g., 2020-11-12,2022-11-15).
byValueTypestringThe time unit to use when filtering by value. Available values: HOUR, DAY, DAY_OF_WEEK, WEEK, MONTH.
byValuenumberA numeric value to filter metrics by (must be used with byValueType).
incidentDateRangestringFilter incidents by date range (e.g., 2020-11-12,2022-11-15).
byTrackingIdstringFilter metrics by tracking ID.
byIncidentStatusstringFilter metrics by incident status.
byModelTypestringFilter by model type (comma-separated list). Available values: TRADE, PRODUCT, SHIPMENT.
byModelIdsstringFilter metrics by model IDs (comma-separated).
byCreatedByIdsstringFilter metrics by the IDs of users who created the incidents.
orderstringSort results by ascending (ASC) or descending (DESC).

Response: 200 OK

A successful response returns the requested incident report metrics based on the provided filters.

Example Response:

{
"totalIncidents": 250,
"groupedMetrics": [
{
"groupBy": "TRADE_SELLER",
"value": "Seller123",
"incidentCount": 50
},
{
"groupBy": "TRADE_BUYER",
"value": "Buyer456",
"incidentCount": 30
}
],
"dateRange": "2020-11-12,2022-11-15"
}

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request GET \ 
--url /api/v1/incident-reports/metrics \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!